<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<#assign s=JspTaglibs["/WEB-INF/tld/struts-tags.tld"]>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<title>Git Package查看</title>
		
		<link rel="stylesheet" type="text/css" href="${base}/css/base.css" />
		<link rel="stylesheet" type="text/css" href="${base}/css/ext/ext-all.css" />
		
		<script src="${base}/js/jquery_1.2.1.min.js"></script>
		<script src="${base}/js/ext/adapter/ext/ext-base.js"></script>
		<script src="${base}/js/ext/ext-all-debug.js"></script>
	</head>
	
	
	<body>
	<include "showpage.jsp">
	
	<script>
		var packageInfoList = [
			<#if packageList?exists>
				<#list packageList as packageInfo>
					<#if packageInfo?exists>
						['${packageInfo.BranchName}',
					 	'${packageInfo.BranchTag}',
					 	'${packageInfo.GitServer}',
					 	'${packageInfo.BuildStatus}',
					 	'${packageInfo.StartTime?string("yyyy/MM/dd HH:mm:ss")}',
					 	'${packageInfo.FinishTime?string("yyyy/MM/dd HH:mm:ss")}',
					 	'${packageInfo.BuildNote}',
					 	'${packageInfo.DownloadUrl}',
					 	'<#if
					 	packageInfo.BuildStatus='SUCCESS'>${packageInfo.DownloadUrl}</#if>']
					 	<#if packageInfo_has_next>,</#if>
					 </#if>>
				</#list>
			</#if>		 
		];
		
	var store = new Ext.data.SimpleStore({
		fields:[
			{name:'BranchName'},
			{name:'BranchTag'},
			{name:'GitServer'},
			{name:'BuildStatus'},
			{name:'StartTime'},
			{name:'FinishTime'},
			{name:'BuildNote'},
			{name:'DownloadUrl'}
		],
		data: packageInfoList
	});
	
	var columns = [
		new Ext.grid.RowNumber({
			width:30
		});
		{header:'分支',width: , dataIndex:'BranchName'},
		{header:'Tag',width: , dataIndex:'BranchTag'},
		{header:'项目名称',width: , dataIndex:'GitServer'},
		{header:'集成状态',width: , dataIndex:'BuildStatus'},
		{header:'开始时间',width: , dataIndex:'StartTime'},
		{header:'结束时间',width: , dataIndex:'FinishTime'},
		{header:'构建备注',width: , dataIndex:'BuildNote'},
		{header:'', dataIndex:'DownloadUrl' render：return "<a herf = javascript:;'onclick=DownloadUrl'>下载</a>"},
	]
	</script>
	
	</body>